From aeb915bbac8121ff17bafe8946b72247a73d1349 Mon Sep 17 00:00:00 2001 From: Ewan Mellor Date: Mon, 4 Dec 2006 10:27:23 +0000 Subject: [PATCH] Tidy error message. Signed-off-by: Ewan Mellor --- tools/python/xen/xend/XendDomainInfo.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/tools/python/xen/xend/XendDomainInfo.py b/tools/python/xen/xend/XendDomainInfo.py index 0aa71fc4e6..5488b17f8f 100644 --- a/tools/python/xen/xend/XendDomainInfo.py +++ b/tools/python/xen/xend/XendDomainInfo.py @@ -1709,8 +1709,10 @@ class XendDomainInfo: dom = XendDomain.instance().domain_lookup_nr(name) if dom and dom.info['uuid'] != self.info['uuid']: - raise VmError("VM name '%s' already exists as domain %s" % - (name, str(dom.domid))) + raise VmError("VM name '%s' already exists%s" % + (name, + dom.domid is not None and + ("as domain %s" % str(dom.domid)) or "")) def update(self, info = None, refresh = True): -- 2.30.2